freebsd-64/root# ipfw show
00100     0       0 allow ip from any to any via lo0
00210    80    7611 divert 8668 ip from 192.168.0.0/24 to any in via em1
00220    65    9108 divert 8668 ip from any to 192.168.0.0/24 out via em1
65000 12563 1465527 allow ip from any to any
65535     0       0 deny ip from any to any

freebsd-64/root# ps auxwww | grep natd
root     1396  0.0  0.7  3580  1184   1  I+    4:58PM   0:00.01 natd -verbose -same_ports -interface em1 -target_address 192.168.13.2

freebsd-64/root# ps auxwww | grep nginx
root      885  0.0  0.8  4116  1524  ??  Is    2:21PM   0:00.00 nginx: master process /usr/local/sbin/nginx
www       887  0.0  1.1  4116  2000  ??  I     2:21PM   0:00.01 nginx: worker process (nginx)

freebsd-64/root# cat /usr/local/etc/nginx/nginx.conf
user  www;
worker_processes  1;
error_log  /var/log/nginx-error.log notice;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  text/html;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx-access.log  main;

    keepalive_timeout  65;

    server {
        listen       192.168.13.2:80;
        server_name  localhost;

        location / {
            root   /usr/local/www/nginx;
            index  index.html index.htm;
        }

        rewrite ^/(.*) http://www.portal.com redirect;					---> here
        return 403;
    }
}


===

freebsd-64/root# natd -verbose -same_ports -interface em1 -target_address 192.168.13.2
natd[1396]: Aliasing to 192.168.13.2, mtu 1500 bytes

In  {default}[TCP]  [TCP] 192.168.0.101:21345 -> 1.2.3.4:80 aliased to
           [TCP] 192.168.0.101:21345 -> 192.168.13.2:80
Out {default}[TCP]  [TCP] 192.168.13.2:80 -> 192.168.0.101:21345 aliased to
           [TCP] 1.2.3.4:80 -> 192.168.0.101:21345
In  {default}[TCP]  [TCP] 192.168.0.101:21345 -> 1.2.3.4:80 aliased to
           [TCP] 192.168.0.101:21345 -> 192.168.13.2:80
In  {default}[TCP]  [TCP] 192.168.0.101:21345 -> 1.2.3.4:80 aliased to
           [TCP] 192.168.0.101:21345 -> 192.168.13.2:80
Out {default}[TCP]  [TCP] 192.168.13.2:80 -> 192.168.0.101:21345 aliased to
           [TCP] 1.2.3.4:80 -> 192.168.0.101:21345
Out {default}[TCP]  [TCP] 192.168.13.2:80 -> 192.168.0.101:21345 aliased to
           [TCP] 1.2.3.4:80 -> 192.168.0.101:21345
In  {default}[TCP]  [TCP] 192.168.0.101:21345 -> 1.2.3.4:80 aliased to
           [TCP] 192.168.0.101:21345 -> 192.168.13.2:80
In  {default}[TCP]  [TCP] 192.168.0.101:21345 -> 1.2.3.4:80 aliased to
           [TCP] 192.168.0.101:21345 -> 192.168.13.2:80
Out {default}[TCP]  [TCP] 192.168.13.2:80 -> 192.168.0.101:21345 aliased to
           [TCP] 1.2.3.4:80 -> 192.168.0.101:21345
